<!DOCTYPE html>
<html>
<head>
</head>
<body>
	<script>
		var gui = require('nw.gui');
    gui.Window.get().hide();
		var user_agent = navigator.userAgent.split('/');
		document.body.insertAdjacentHTML('beforeEnd',user_agent[0]+
	'<p>testing user agent when a new window opened</p>');

    var socket = require('net').connect({port: 13013});
    socket.setEncoding('utf8');
    socket.end(user_agent[0]);

	</script>
</body>
</html>
